home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac100% 1999 April
/
MAC100-1999-04.ISO.7z
/
MAC100-1999-04.ISO
/
オンラインソフト定点観測
/
Demo
/
MacToPic Plus 8.8.0 Demo.sea
/
MacToPic +™ Demo
/
Plus sample programs
/
MAC-TO-HOST PROGRAM
< prev
next >
Wrap
Text File
|
1996-07-16
|
2KB
|
73 lines
*
* MAC-TO-HOST Data transfer program
* Accepts data from a Macintosh and puts it in a hold file on the host.
* You must create a hold file called HOLD before running this program.
* Example: CREATE-FILE (HOLD 1,1 10,1)
*
* This program is supplied by Carnation Software for use with MacToPic.
* Transfer it to your PICK host with the 'Mac-To-Host Transfer' option
* then compile and run it."
*
*Each new line transferred to the PICK host will become a new item in
*the HOLD file.
*NOTE: If you also want each field in a line to become a new attribute,
* make sure that 'Convert tabs to Attribute marks' is enabled in
* the 'Mac-To-Host Transfer Options' under the Edit Menu
* in MacToPic.
*
* You may modify this program to suit your needs.
*
PRINT @(-1):
PRINT"This file transfer routine will replace the current contents"
PRINT"of the file named HOLD with data transferred from a Mac text file"
PRINT "Do you want to continue ":
INPUT A,80
IF OCONV(A,"MCU")[1,1] = "Y" OR OCONV(A,"MCU")[1,1] = "y" THEN
OPEN "HOLD" TO HOLD ELSE
PRINT "UNABLE TO OPEN 'HOLD'FILE"
END
10 *
CLEARFILE HOLD
*EXECUTE "CLEAR-FILE HOLD" ;*USE THIS IF CLEARFILE HOLD DOES NOT WORK
TOTAL.RECORDS = 0
PRINT @(-1):
*INSTRUCT USER WHAT SELECTIONS TO MAKE ON THE MACINTOSH TO INITIATE
*THE TRANSFER
*
PRINT @(-1)
PRINT @(1,5)
PRINT"TO BEGIN THE FILE TRANSFER:"
PRINT
PRINT '1) Select Mac-To-Host Transfer Options from the Edit menu, then click "OK".'
PRINT '2) Select Mac-To-Host Transfer from the File Menu.'
PRINT '3) Select the file you want to transfer then click OPEN.'
PRINT
PRINT"(Type END when the data transfer is done)"
PRINT"Data will be transferred to a file called HOLD"
*
*READ IN THE DATA FROM THE MACINTOSH
*
*ADD EACH RECEIVED RECORD TO THE "HOLD" FILE USING THE
*RECORD NUMBER TO BE THE ITEM NUMBER ASSIGNMENT.
*
60 *
INPUT A,1500
IF OCONV(A,"MCU")[1,3] = "END" OR OCONV(A,"MCU")[1,4] = "QUIT" THEN
PRINT @(-1)
PRINT"TRANSFER DONE"
GOTO 999
END
*
*
TOTAL.RECORDS = TOTAL.RECORDS +1
X.HOLD = A
IF A<>"" THEN
WRITE X.HOLD ON HOLD, TOTAL.RECORDS
END
GOTO 60
*
999 *
PRINT CHAR(7)
END
END